<div class="page-header">
	<h1>
            Simula&ccedil;&atilde;o <small>da Lista <?php echo $this->lista->nm_lista?></small>
	</h1>
</div>

<div class="baseUrl"><?php echo $this->baseUrl() ?></div>

<div class="row">
	<div>
		<ul class="breadcrumb">
			<li><?php echo $this->href(array('controller' => 'index', 'action' => 'index', 'module' => 'default', 'content' => 'Home', 'checkAcl' => true))?></li>
			<span class="text-info divider"> >> </span>
			<li class="active">Simula&ccedil;&atilde;o das Listas de Compras</li>
		</ul>
	</div>
</div>

<div class="row">
	<div class="col-md-3">
	<table class="table table-striped">
		<?php foreach ($this->listas as $lista):?>
		<tr>
			<td>
			<?php echo $this->href(array('controller' => 'usuario', 'action' => 'simulacao', 'module' => 'default', 'params' => array('id_lista' => $lista->id_lista_compra), 'attribs' => array('data-toggle' => 'tooltip', 'data-placement' => 'right', 'title' => 'Ver Simula&ccedil;&otilde;es'), 'content' => "{$lista->nm_lista}", 'checkAcl' => true))?>
		</tr>
		<?php endforeach; ?>
	</table>
	</div>
	<div class="col-md-9">
		<div class="row">
			<h3>
				<i class="glyphicon glyphicon-screenshot"></i> &Aacute;rea
				Prefer&ecirc;ncia
			</h3>
			<table class="table table-striped">
				<?php foreach ($this->simulacoes[TipoSimulacao::REGIAO_PREFERIDA] as $nomeLista => $simulacao):?>
				<?php foreach ($simulacao as $mercado): ?>
				<tr>
					<td><?php echo $mercado['nome'] ?></td>
					<td>R$ <?php echo str_replace('.', ',' , $mercado['valor']) ?>
					</td>
				</tr>
				<?php endforeach; ?>
				<?php endforeach; ?>
			</table>
		</div>
		<div class="row">
			<h3>
				<i class="glyphicon glyphicon-heart"></i> Mercado Preferidos
			</h3>
			<table class="table table-striped">
				<?php foreach ($this->simulacoes[TipoSimulacao::MERCADO_PREFERIDO] as $nomeLista => $simulacao):?>
				<?php foreach ($simulacao as $mercado): ?>
				<tr>
					<td><?php echo $mercado['nome'] ?></td>
					<td>R$ <?php echo str_replace('.', ',' , $mercado['valor']) ?>
					</td>
				</tr>
				<?php endforeach; ?>
				<?php endforeach; ?>
			</table>
		</div>
		<div class="row">
			<h3>
				<i class="glyphicon glyphicon-map-marker"></i>
				Geolocaliza&ccedil;&atilde;o
			</h3>
			<table class="table table-striped">
				<?php foreach ($this->simulacoes[TipoSimulacao::GEOLOCALIZACAO] as $nomeLista => $simulacao):?>
				<?php foreach ($simulacao as $mercado): ?>
				<tr>
					<td><?php echo $mercado['nome'] ?></td>
					<td>R$ <?php echo str_replace('.', ',' , $mercado['valor']) ?>
					</td>
				</tr>
				<?php endforeach; ?>
				<?php endforeach; ?>
			</table>
		</div>
	</div>
</div>
